package 华为OD机试真题2023.基础题;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class HJ51_路灯照明问题 {
  public static void main(String[] args) throws FileNotFoundException {
    Scanner in = new Scanner(new File("src/main/java/华为OD机试真题2023/基础题/input/51.txt"));
    int N = in.nextInt();
    int[] left = new int[N];
    int[] right = new int[N];
    for (int i = 0; i < N; i++) {
      int radius = in.nextInt();
      left[i] = i * 100 - radius;
      right[i] = i * 100 + radius;
    }
    left[0] = 0;
    right[N - 1] = 0;
    int res = 0;
    for (int i = 1; i < N; i++) {
      int tmp = left[i] - right[i - 1];
      res += Math.max(tmp, 0);
    }
    System.out.println(res);
  }
}
